home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 6936 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.8 KB

  1. Path: nntp.neu.edu!ghull
  2. From: ghull@lynx.dac.neu.edu (Gregory Hull)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: GNU ld cannot find ____main
  5. Date: 5 Apr 1996 14:00:45 GMT
  6. Organization: Northeastern University, Boston, MA. 02115, USA
  7. Message-ID: <4k392d$8q6@chaos.dac.neu.edu>
  8. NNTP-Posting-Host: lynx.dac.neu.edu
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11.     I've installed the GNU C compiler on my amiga, along wit" 'KRUEMEL's
  12. FRONTEND for THE GNU C COMPILER" and I can compile code fine, but when it 
  13. is time to link I keep getting plagued bu the following error:
  14.  
  15.  
  16. T:first.o: Undefined symbol _  main referenced from text segment]
  17. LD returned error 1.
  18.  
  19. first.c is a simple 'Hello, world' program that I've just been using to 
  20. test the installation of my C compiler.  I've found a few objects in the
  21. gnu directory that have ____main defined in them, but when I include them
  22. in the link I just get more errors.
  23.  
  24. These are my frontend settings for the compiler:
  25.  
  26. GNU PreProcessor:
  27. gcc:lib/gcc-lib/mc68020-cbm-amigados/2.7.0/cpp
  28.  
  29. GNU Compiler Stage 1:
  30. gcc:lib/gcc-lib/mc68020-cbm-amigados/2.7.0/cc1
  31.  
  32. GNU Assembler:
  33. gcc:bin/as
  34.  
  35. GNU Object Linker:
  36. gcc:bin/ld
  37.  
  38. Linker Libraries and Flags:
  39. -nostdlib -Lgcc:lib/libb -lc -Lgcc:os-lib -lamiga  -s
  40.  
  41. PreProcessor Flags:
  42. -nostdinc  -Igcc:include -DAMIGA -Damiga -Dmc68000 -D__GNUC__
  43.  
  44. Compiler Flags:
  45. -m68000 -msoft-float -Wall -fvolatile
  46.  
  47. Assembler Flags:
  48. -mc68000
  49.  
  50. Header file to link first:
  51. gcc:lib/crt0.o
  52.  
  53. Optimize flags (activated by '-O#'):
  54. -fomit-frame-pointer -funroll-loops
  55.  
  56. Default Stack Size:
  57. 140000
  58.  
  59.  
  60.     So, if I ma making some obvious mistake or if anyone has any clues
  61. as to what I need to link, or change in other areas to, in order to 
  62. resolve my problem, please let me know.  Thanx.
  63.  
  64. Greg Hull
  65. Northeastern College of Computer Science, Boston MA
  66. Lotus Corp, Cambridge MA
  67.  
  68.  
  69.